package com.zsrt.java.day20161223.wrl.t03;

import java.util.Scanner;

public class HanShux {
	public static void main(String[] args) {
		int x,y;
		Scanner sc = new Scanner(System.in);
		System.out.println("请输入一个整数：");
		x = sc.nextInt();
		if(x < 0){
			y = x * x + 6 * x - 1;
			System.out.println("公式为：y = x * x + 6 * x - 1 \n y = "+y);
		}else if(x<3){
			y = x*x-3*x+1;
			System.out.println("公式为：y = x * x - 3 * x + 1 \n y = "+y);
		}else if(x<10){
			y = x * x;
			System.out.println("公式为：y = x * x \n y = "+y);
		}else{
			y = x * x - x -1;
			System.out.println("公式为：y = x * x - x -1 \n y = "+y);
		}
		sc.close();
	}

}
